; Music of Exolon Atari ST (1987) (Hewson) (Dave Rogers)
; Ripped by Megachur the 18/11/2006

	write "EXOLONAS.BIN"

music_date_rip	equ &12b6
music_adr	equ &7530
init_music	equ BASIC_DEMO
play_music	equ PLAY
stop_music	equ SILENCE
first_theme	equ 0
last_theme	equ 0

	read "music_header_v1_0.asm"

;EXOLONSD.ASM    EXOLON sound driver  (for Atari ST version only)    JDRogers.


SOUNDCOD        EQU       music_begin	; (2000hex) machine code load address.
;SOUNDATA        EQU       soundcod+885  ;datablock load address.

             NOLIST                

PITCHTAB     EQU       SOUNDATA
ENVSINDEX    EQU       PITCHTAB+200
TUNESINDEX   EQU       ENVSINDEX+80
ENVS         EQU       TUNESINDEX+100
TUNEBLOCS    EQU       ENVS+360

envcounts    EQU 0    ;offsets within channel stores:
entcounts    EQU 2
envptr       EQU 4
entptr       EQU 6
env0         EQU 8
ent0         EQU 10
envadr       EQU 12
entadr       EQU 14

chanactive   EQU 16   ;1
maincount    EQU 17   ;1
dataptr      EQU 18   ;2
conptr       EQU 20   ;2
ptrrefr      EQU 22   ;2
pitchshift   EQU 24   ;1
noiseflag    EQU 25   ;1
noisedis     EQU 26   ;1
ch_enable    EQU 27   ;1
advolreg     EQU 28   ;2
stophang     EQU 30   ;1
CURRENTDUR   EQU 31   ;1
INTERVAL     EQU 32   ;1
CURRENTNOTE  EQU 33   ;1
CHORDTOGGLE  EQU 34   ;1

;             ORG  SOUNDCOD
;            WRITE "EXOLONSD.BIN"
start        DEFL $

;------------------------------------------------------------------------------

JUMPBLOCK       JP PLAY          ;used for convenience in Basic Demo
                JP SILENCE
BASIC_DEMO      LD E,1           ;tunebloc
                LD A,1           ;chan
                JR STARTACHAN
;------------------------
; "E" MUST HOLD NUMBER OF TUNEBLOC TO START, "A"=channel 1,2,3. (4=CHANALT)
; CHANALT DYNAMICALLY ALLOCATES TO CHANS 2/3 ALTERNATELY

STARTACHAN      LD C,A            ;a/c=chan num e=tuneblock num
                CALL FINDBLOC     ; 1. PUT BLOCK ADDRESS IN HL, GIVEN E
                LD A,(HL)         ; 2. LOOK FOR START CHANNEL MARKER
                CP 250
                JR NZ,NOCHANMARKER
                INC HL
                LD C,(HL)
                INC HL
NOCHANMARKER    LD A,C
                CP 4             ;3. SEE IF CHANALT
                JR NZ,CH1TO3
CHANALT         LD A,2
                XOR 1
                LD (CHANALT+1),A   ;A GOES 2,3,2,3....
CH1TO3          LD IX,STORE1      ; 3. FIND IX FOR NEW CHAN
                DEC A
                JR Z ,IXfound
                LD IX,STORE2
                DEC A
                JR Z,IXfound
                LD IX,STORE3
IXfound         LD A,(HL)        ; 3. LOOK FOR SPECIAL PRIORITY,ELSE DEFAULT 10
                CP 244
                LD A,10
                JR NZ, TRYSTART
                INC HL
                LD A,(HL)
                INC HL
TRYSTART        CP (IX+CHANACTIVE)   ; 4. TEST AGAINST CURRENT PRIORITY
                RET C
DOSTART         LD (IX+CHANACTIVE),A  ; 5. START CHANNEL
                LD (IX+DATAPTR),L     ;set pointers for this channel
                LD (IX+DATAPTR+1),H
                LD (IX+CONPTR),L
                LD (IX+CONPTR+1),H
                LD (IX+PTRREFR),L
                LD (IX+PTRREFR+1),H
                LD (IX+MAINCOUNT),1
                XOR A
                LD (IX+PITCHSHIFT),A
                LD (IX+INTERVAL),A
                RET                
;-----------------------
SILENCE         XOR A
                LD  (STORE1+CHANACTIVE),A  ;channel-active-flags 0
                LD  (STORE2+CHANACTIVE),A
                LD  (STORE3+CHANACTIVE),A
                LD (BUFF+8),A              ;volume registers 0
                LD (BUFF+9),A
                LD (BUFF+10),A
                LD   A,1+2+4+8+16+32       ;all gates shut
                LD   (BUFF+7),A            ;follow through to allregist

ALLREGIST       XOR  A
                LD   HL,BUFF+13            ;register buffer
                LD   DE,#F40D              ;D=Psg data port, E=counter
nextreg         LD   B,D
                OUT  (C),E                 ;output register No
                LD   BC,#F6*256+%11000000
                OUT  (C),C                 ;tell PSG to latch reg No
                OUT  (C),A                 ;PSG to inactive
                LD   B,D
                LD   C,(HL)                ;C=register data
                DEC  HL
                OUT  (C),C                 ;output register data
                LD   BC,#F6*256+%10000000
                OUT  (C),C                 ;tell PSG to read reg data
                OUT  (C),A                 ;PSG to inactive
                DEC  E
                JP   P,nextreg
                RET
;-------------------------subroutines
FINDBLOC        LD   A,E
                ADD  A,A
                ADD  A,TUNESINDEX AND #00FF
                LD   L,A
                ADC  A,TUNESINDEX AND #FF00 /256
                SUB  L
                LD   H,A         ;HL now points to 2byte value in table 
                LD   E,(HL)
                INC  HL
                LD   D,(HL)      ;DE=value(offset)
                LD HL,TUNEBLOCS
                ADD HL,DE        ;HL=address of new tunebloc
                RET

FINDENV         LD   A,E
                ADD  A,A
                ADD  A,ENVSINDEX AND #00FF    ;16 bit add using 8 bit ops
                LD   L,A
                ADC  A,ENVSINDEX AND #FF00 / 256
                SUB  L
                LD   H,A       ;HL points to 2byte offset
                LD   E,(HL)
                INC  HL
                LD   D,(HL)    ;DE=offset     
                LD HL,ENVS
                ADD HL,DE      ;HL=envelope address
                RET

;-------------------MAIN CALL--------EVERY 1/50 SECOND-----------------------

PLAY            CALL ALLREGIST     ;throw all buffer into sound chip registers
                LD   IX,STORE1     ;---do channel 1 (IX points to chan1 store)
                LD   IY,BUFF       ;  (IY holds addr of pitchstore for chan1) 
                CALL TESTCHAN
                LD   IX,STORE2     ;---do channel 2
                LD   IY,BUFF+2
                CALL TESTCHAN
                LD   IX,STORE3     ;---do channel 3
                LD   IY,BUFF+4
                CALL TESTCHAN
                JP DOENSE        ;do noise envelope
                 ;  RET        -------------->>>>>>> out

;FOR EACH OF THE 3 CHANNELS:

TESTCHAN        LD  A,(IX+CHANACTIVE)  ;CHAN ACTIVE?
                OR A
                RET Z                  ;do nothing if channel not active
                DEC  (IX+maincount)    ;duration countdown, new note when 0
                JP NZ,DOENV_ENT
                LD (IX+STOPHANG),20

READDECIDE      LD  H,(IX+dataptr+1)   ;get data ptr address
                LD  L,(IX+dataptr)
DECI            LD   A,(HL)            ;A=peek(ptr)
                INC  HL
                LD   E,(HL)            ;E=peek(ptr+1)
                INC HL                 ;inc and store ptr for next time
CONTPTR         LD (IX+DATAPTR+1),H
                LD (IX+DATAPTR),L
                DEC (IX+STOPHANG)
                RET Z     ;gets out of possible endless loops after 20 passes 
;-------------------------------------------------------------
; THE FOLLOWING ROUTINES RESPOND TO DATA AND JUMP BACK TO READDECIDE OR DECI,
; EVENTUALLY EXITING VIA "NEWNOTE","PLAYRAND" OR "KILLCHAN" ROUTINES

SUBSELECT  CP   0             ;A=VALUE
           JP   Z,DOPAUSE     ;pitch 0 = pause
           CP   101
           JP   C,NEWNOTE     ;LESS THAN 100=normal note
           CP   220
           JP   C,SINGLENOTE  
           CP   228
           JR   Z,NOISE       ;add noise to a note
           CP  227
           JP  Z,PLAYRAND     ;PLAY FROM RANDNOTE STORE(+PITCHSHIFT)
           CP   225
           JP   Z,KILLCHAN    ;shut chan after e.g.short sound effects
           CP   233
           JR   Z,NEWENT      ;set new tone-envelope for current channel
           CP   232
           JR   Z,NEWENV      ;set new volume-env for current chan
           CP   234
           JR   Z,NEWENSE     ;set new noise-envelope
           CP  226
           JP  Z,NEWRANDNOTE  ;226/ander. RANDnote = 255 AND ANDER
           CP   229
           JR   Z,GONEWBLOCK  ;play a given tunebloc,then return to 1st
           CP   230
           JR   Z,NEWKEY      ;change musical key for current chan
           CP  240
           JP  Z,SETINTERVAL 
           CP   255
           JR   Z,RETCONBLOC  ;end-of-tunebloc marker
           CP   252
           JR   C,DECI        ;SAFETY NET 
                              ;vals 252,253,254=follow through:

STARTLOOP       PUSH IX            ;252=STARTCHAN1, 253=CHAN2, 254=CHAN3
                SUB 251            ;A=CHAN E=TUNEBLOC
                CALL STARTACHAN
                POP IX
                JR READDECIDE       

NOISE           LD   A,E
                LD   (BUFF+6),A        ;noisepitch
                LD   (IX+noiseflag),1
                JR   DECI

NEWKEY          LD   (IX+pitchshift),E
                JR   DECI

NEWENT          CALL FINDENV        ;returns with envelope address in HL
                LD (IX+ENTADR),L
                LD (IX+ENTADR+1),H
                JP READDECIDE

NEWENV          CALL FINDENV
                LD (IX+ENVADR),L
                LD (IX+ENVADR+1),H
                JP READDECIDE

NEWENSE         CALL FINDENV
                LD (ENSSTORE+12),HL
                JP READDECIDE

GONEWBLOCK      LD   (IX+conptr+1),H
                LD   (IX+conptr),L    ;leaving bloc so store ptr
                CALL FINDBLOC
                JP   DECI

RETCONBLOC      LD   H,(IX+conptr+1)  ;(ptr re-enters original "conductor" bloc)
                LD   L,(IX+conptr)
                LD   A,(HL)
                INC A                 ;TEST FOR 255,end-of-conductor-bloc marker
                JR   NZ,NOTEND
                LD   H,(IX+ptrrefr+1) ;refresh
                LD   L,(IX+ptrrefr)
notend          JP   DECI

KILLCHAN        LD (IX+CHANACTIVE),0
killvol         LD H,(IX+ADVOLREG+1)
                LD L,(IX+ADVOLREG)    ;HL=address of vol register,current chan
                LD (HL),0
                RET

SINGLENOTE      AND 127
                DEC HL
                LD E,(IX+CURRENTDUR)
                JP CONTPTR

SETINTERVAL     LD (IX+INTERVAL),E
                JP DECI

NEWRANDNOTE     LD HL,10418  ;RANDSEED,SELF MOD LATER      
                LD C,L
                LD B,H
                ADD HL,HL
                ADD HL,HL
                ADD HL,BC
                ADD HL,HL
                ADD HL,HL
                ADD HL,HL
                ADD HL,BC
                LD (NEWRANDNOTE+1),HL
                LD A,H               ;A=0 TO 255
                AND E                ;E = ANDER = range limiter
                INC A                ;A=1 to (0 gives pause!)
                LD (PLAYRAND+1),A
                JP READDECIDE

PLAYRAND        LD A,42   ;SELF MODIFIED VALUE

NEWNOTE         ADD  A,(IX+pitchshift)   ;A=notenum
DOPAUSE         LD   (IX+maincount),E    ;E=duration
                LD (IX+CURRENTDUR),E     ;for compressor
                LD (IX+CURRENTNOTE),A    ;for chorder

                CALL FINDSETPITCH

                call killvol ;zero volume of current chan

                PUSH IX           ;RESTART ENV/ent
                POP  DE           ;DE=start of chan store
                LD   HL,8
                ADD  HL,DE        ;HL=start of chan store+8
                LDI
                LDI
                LDI
                LDI
                LDI
                LDI
                LDI
                LDI

                DEC  (IX+noiseflag)      ;test noiseflag
                LD  (IX+NOISEFLAG),0     ;RESET EVERY TIME!
                LD  L,(IX+NOISEDIS)      ;DEFAULT DISABLE
                JR   NZ,GATING

NOISEon         LD HL,(ENSSTORE+envadr)  ;restart noise envelope
                LD (ENSSTORE+envptr),HL
                LD HL,00
                LD (ENSSTORE),HL         ;L=0,no noisedisable

GATING          LD   A,(BUFF+7)
                AND  (IX+ch_enable)      ;chan ENable (pitch AND noise on)
                OR   L                   ;noise DISable
                AND 32+16+8+4+2+1        ;SAFETY, top 2 bits must remain off
                LD   (BUFF+7),A          ;FINAL RESULT IN A!
;------------------------------------
                           ;IX points to volume-env workspace for current chan
DOENV_ENT       CALL ENGENERAL         ;returns with "volume change+128" in C
                LD   H,(IX+advolreg+1)
                LD   L,(IX+advolreg)
                LD   A,(HL)
                ADD  A,C  
                SUB  128
                LD   (HL),A

ISITAPAUSE      LD A,(IY+0)
                OR   (IY+1)
                RET Z
ISITACHORD      LD A,(IX+interval)
                OR A
                JP NZ,DOCHORD
DOENT           INC  IX  ;make IX work on tone-envelope workspace,2 bytes along
                INC  IX
                CALL ENGENERAL   ;returns with "pitch change+128" in C
                LD   H,(IY+1)    ;get pitch of note
                LD   L,(IY+0)
                ADD  HL,BC
                LD   C,128       ;deduct 128, allows negative changes
                SBC  HL,BC
                LD   (IY+1),H    ;replace in current channel pitch store
                LD   (IY+0),L
                RET

DOCHORD         LD A,(IX+CHORDTOGGLE)
                XOR 1
                LD (IX+CHORDTOGGLE),A
                LD A,(IX+CURRENTNOTE)

                JR Z,FINDSETPITCH
                ADD (IX+INTERVAL)
                
FINDSETPITCH    ADD  A,A                     ;get new pitch from pitchtable
                ADD  A,PITCHTAB AND #00FF
                LD   E,A
                ADC  A,PITCHTAB AND #FF00 /256
                SUB  E
                LD   D,A
                LD   A,(DE)
                LD   (IY+0),A     ;IY=address of pitchstore for current chan
                INC  DE
                LD   A,(DE)
                LD   (IY+1),A
                RET

DOENSE          LD   IX,ENSSTORE  ;IX now = noise envelope workspace
                CALL ENGENERAL    ;returns with "noise shift+128" in C 
                LD   A,(BUFF+6)   ;get current noise value
                ADD  A,C
                SUB  128          ;add shift, minus 128
                LD   (BUFF+6),A   ;replace
                CP 17
                RET C
noiseoff        LD A,(BUFF+7)
                OR 32+16+8
                LD (BUFF+7),A 
                RET

ENGENERAL       PUSH IX       ;(subroutine to do envelope and return value)
                POP  HL                ;points to counts
                LD   D,(IX+ENVPTR+1)   ;points to envelope
                LD   E,(IX+ENVPTR)
                INC  (HL)     ;inc count
                LD   A,(DE)
                SUB  (HL)     ;compare to envelope
                LD   BC,128   ;DEFAULT (C= 128 = 0 )
                RET  NZ       ;count not reached
                LD   (HL),A   ;A=0, resets count
                INC DE        ;move along envelope
                LD  A,(DE)
                LD  C,A       ;C HOLDS INCREMENT
                INC  DE       ;point at repeats number
                INC  HL
                INC  (HL)     ;point at repeats count
                LD   A,(DE)
                SUB  (HL)     ;compare
                RET  NZ       ;count not reached
                LD   (HL),A   ;A=0, resets count;
                INC  DE       ;move to next section of envelope
                LD   A,(DE)
                INC  A        ;test for A=255 (end of envelope marker)
                JR   NZ,nextsect
                LD   D,(IX+envadr+1)   ;refresh ptr to start of envelope
                LD   E,(IX+envadr)
nextsect        LD   (IX+envptr+1),D  
                LD   (IX+envptr),E
                RET
;--------------------------------------------------------

BUFF      DW  00       ;a pitch     ;holds replica of sound chip registers
          DW  00       ;b pitch
          DW  00       ;c pitch
          DB  0        ;noise pitch
          DB  32+16+8  ;gates
          DB  0        ;a vol
          DB  0        ;b vol
          DB  0        ;c vol
          DW  100      ;hard env len
          DB  10       ;hard env type

ensstore  DW 00 ;ENSCOUNTS    ;noise envelope workspace
          DW 10               ;dummy spacer to give same format as chan stores
          DW 00 ;ENSPTR
          DW 04
          DW 00 ;ENS0
          DW 18
          DW 00 ;ENSADR
;----------------------------------
;channel stores

STORE1    DW  00     ;env counts
          DW  00     ;ENT COUNTS
          DW  00     ;ENV PTR
          DW  00     ;ENT PTR

          DW  00     ;ENV ZEROERS
          DW  00     ;ENT ZEROERS
          DW  00     ;ENV ADDR
          DW  00     ;ENT ADDR

          DB  0      ;CHAN ACTIVE
          DB  0      ;MAIN COUNT
          DW  00     ;MAIN PTR
          DW  00     ;CON PTR
          DW  00     ;PTR REFRESH
          DB  0      ;PITCHSHIFT
          DB  0      ;NOISE FLAG
          DB   8        ;NOISE DIS
          DB  32+16+4+2 ;chan ENable
          DW  BUFF+8    ;AD OF VOL REG
          DB  0
          DB  0      ;CURRENTDUR (FOR COMPRESSOR)
          DB  0
          DB  0
          DB  0

STORE2  DW  00
        DW  00
        DW  00
        DW  00

        DW  00
        DW  00
        DW  00
        DW  00

        DB  0
        DB  0
        DW  00
        DW  00
        DW  00
        DB  0
        DB  0
        DB  16        ;NOISE DIS
        DB  32+8+4+1  ;chan ENable
        DW  BUFF+9    ;AD OF VOL REg
        DB  0
        DB  0
        DB  0
        DB  0
        DB  0

STORE3  DW  00
        DW  00
        DW  00
        DW  00

        DW  00
        DW  00
        DW  00
        DW  00

        DB  0
        DB  0
        DW  00
        DW  00
        DW  00
        DB  0
        DB  0
        DB  32       ;NOISE DIS
        DB  16+8+2+1 ;CHAN ENABLE
        DW  BUFF+10  ;AD OF VOL REG
        DB  0
        DB  0
        DB  0
        DB  0
        DB  0

;------------------------------------------------
; #7880
	db #00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00
SOUNDATA
	db #00,#00
	dw #150c,#13dd,#12c0,#11b2
	dw #10b4,#0fc4,#0ee2,#0e0c
	dw #0d42,#0c84,#0bd0,#0b26
	dw #0a86,#09ef,#0960,#08d9
	dw #085a,#07e2,#0771,#0706
	dw #06a1,#0642,#05e8,#0593
	dw #0543,#04f7,#04b0,#046d
	dw #042d,#03f1,#03b8,#0383
	dw #0350,#0321,#02f4,#02ca
	dw #02a1,#027c,#0258,#0236
	dw #0217,#01f9,#01dc,#01c1
	dw #01a8,#0190,#017a,#0165
	dw #0151,#013e,#012c,#011b
	dw #010b,#00fc,#00ee,#00e1
	dw #00d4,#00c8,#00bd,#00b2
	dw #00a8,#009f,#0096,#008e
	dw #0086,#007e,#0077,#0070
	dw #006a,#0064,#005e,#0059
	dw #0054,#004f,#004b,#0047
	dw #0043,#003f,#003c,#0038
	dw #0035,#0032,#002f,#002d
	dw #002a,#0028,#0025,#0023
	dw #0021,#0020,#001e,#001c
	dw #001b,#0019,#0018,#0016
	dw #0015,#0014
	db #00,#00,#00,#00,#04,#00,#11,#00
	db #18,#00,#22,#00,#38,#00,#48,#00
	db #55,#00,#62,#00,#6f,#00,#79,#00
	db #83,#00,#8d,#00,#97,#00,#a1,#00
	db #ab,#00,#b5,#00,#c8,#00,#cf,#00
	db #d3,#00,#da,#00,#e1,#00,#eb,#00
	db #ef,#00,#f3,#00,#09,#01,#16,#01
	db #23,#01,#27,#01,#2e,#01,#35,#01
	db #42,#01,#4f,#01,#53,#01,#5a,#01
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#0a,#00,#77,#00
	db #b6,#00,#c8,#00,#dd,#00,#46,#01
	db #90,#01,#b1,#01,#f2,#01,#12,#02
	db #73,#02,#d0,#02,#da,#02,#2d,#03
	db #58,#03,#5c,#03,#93,#03,#d0,#03
	db #16,#04,#21,#04,#84,#05,#46,#05
	db #3d,#04,#8f,#05,#56,#04,#a0,#05
	db #7e,#04,#88,#04,#93,#04,#6a,#05
	db #b0,#04,#bb,#04,#c6,#04,#d4,#04
	db #f1,#04,#fc,#04,#0a,#05,#17,#05
	db #59,#05,#46,#05,#59,#05,#68,#05
	db #8c,#05,#97,#05,#a8,#05,#00,#00
	db #00,#00,#00,#00,#00,#00,#c8,#80
	db #c8,#ff,#01,#8e,#01,#01,#79,#01
	db #01,#82,#03,#c8,#80,#c8,#ff,#01
	db #8a,#01,#c8,#80,#c8,#ff,#01,#8e
	db #01,#01,#7f,#03,#c8,#80,#c8,#ff
	db #01,#8f,#01,#01,#7f,#02,#02,#7f
	db #02,#05,#7f,#02,#08,#7f,#02,#0e
	db #7f,#07,#c8,#80,#c8,#ff,#01,#8f
	db #01,#01,#7f,#05,#01,#85,#01,#01
	db #7f,#0f,#c8,#80,#c8,#ff,#01,#8f
	db #01,#01,#7f,#03,#01,#81,#01,#c8
	db #80,#c8,#ff,#01,#8d,#01,#04,#80
	db #01,#04,#7f,#0d,#c8,#80,#c8,#ff
	db #01,#8f,#01,#02,#7f,#01,#06,#7f
	db #09,#c8,#80,#c8,#ff,#01,#8f,#01
	db #01,#7e,#06,#c8,#80,#c8,#ff,#01
	db #88,#01,#01,#7c,#02,#c8,#80,#c8
	db #ff,#01,#78,#01,#01,#84,#02,#c8
	db #80,#c8,#ff,#02,#81,#02,#02,#7f
	db #03,#02,#81,#01,#ff,#01,#81,#01
	db #01,#7f,#02,#01,#81,#01,#ff,#01
	db #82,#01,#01,#7c,#01,#01,#82,#01
	db #ff,#01,#83,#02,#01,#7d,#04,#01
	db #83,#02,#ff,#01,#82,#01,#03,#7e
	db #01,#02,#81,#01,#04,#7f,#01,#01
	db #82,#01,#05,#7e,#01,#ff,#01,#86
	db #01,#c8,#80,#c8,#ff,#01,#96,#c8
	db #ff,#01,#8d,#01,#c8,#80,#c8,#ff
	db #01,#8c,#01,#01,#7c,#01,#ff,#01
	db #80,#01,#01,#b4,#01,#c8,#80,#c8
	db #ff,#01,#81,#c8,#ff,#01,#7f,#c8
	db #ff,#01,#82,#03,#02,#81,#01,#03
	db #81,#01,#04,#81,#01,#05,#81,#02
	db #17,#7f,#0b,#c8,#80,#c8,#ff,#01
	db #8f,#01,#04,#80,#01,#01,#7f,#02
	db #09,#7f,#0d,#ff,#01,#84,#01,#02
	db #82,#05,#0c,#7f,#0b,#c8,#80,#c8
	db #ff,#01,#8b,#01,#ff,#01,#8c,#01
	db #13,#7f,#0c,#ff,#01,#99,#01,#01
	db #69,#01,#ff,#01,#6c,#02,#02,#99
	db #02,#03,#60,#02,#04,#95,#02,#ff
	db #01,#8e,#01,#01,#79,#02,#01,#8c
	db #01,#01,#7a,#02,#ff,#03,#7d,#01
	db #ff,#01,#8c,#01,#01,#7f,#0c,#ff
	db #01,#8f,#01,#01,#80,#01,#02,#7f
	db #01,#07,#7f,#0f,#ff,#00
;.l7b89
	db #00,#01,#ff,#00,#01,#ff,#00,#01
	db #ff,#00,#fa,#01,#fd,#02,#fe,#03
	db #e6,#0e,#e8,#02,#e9,#14,#f0,#00
	db #00,#78,#3c,#48,#e5,#04,#e5,#04
	db #e5,#04,#e5,#04,#e6,#0c,#e5,#04
	db #e6,#11,#e5,#04,#e6,#18,#e5,#04
	db #e6,#16,#e5,#04,#e6,#1a,#e5,#04
	db #e6,#13,#e5,#04,#e6,#0e,#e5,#04
	db #e5,#04,#e6,#0c,#e5,#04,#e6,#11
	db #e5,#04,#e6,#18,#e5,#04,#e6,#16
	db #e5,#04,#e6,#1a,#e5,#04,#e6,#1c
	db #e5,#04,#e5,#04,#fe,#0c,#e5,#0a
	db #fe,#06,#e5,#0d,#fe,#0c,#e5,#0a
	db #fe,#06,#e5,#0d,#fe,#24,#e8,#03
	db #e9,#14,#21,#fc,#e5,#10,#ff,#e6
	db #0e,#e8,#02,#e9,#14,#f0,#00,#00
	db #7e,#3c,#42,#00,#c0,#f0,#18,#e5
	db #05,#29,#60,#f0,#13,#e6,#1a,#e5
	db #05,#f0,#0c,#21,#30,#2d,#30,#39
	db #30,#f0,#00,#e9,#12,#4c,#0c,#47
	db #0c,#41,#0c,#00,#0c,#e5,#0b,#e5
	db #0e,#e5,#0b,#e5,#0e,#f0,#00,#e9
	db #14,#3b,#fc,#00,#c0,#ff,#e6,#0e
	db #e5,#06,#ff,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #e8,#05,#e9,#0c,#0c,#0c,#18,#0c
	db #0c,#0c,#18,#0c,#0c,#0c,#18,#0c
	db #0c,#0c,#18,#0c,#ff,#e9,#0d,#e8
	db #09,#24,#12,#24,#06,#24,#0c,#e8
	db #07,#2b,#30,#26,#06,#28,#06,#29
	db #0c,#28,#0c,#26,#0c,#28,#0c,#24
	db #18,#e9,#0b,#1f,#18,#e9,#0d,#e8
	db #09,#24,#12,#24,#06,#24,#0c,#e8
	db #07,#2b,#30,#2b,#06,#2d,#06,#2e
	db #0c,#2d,#0c,#2b,#0c,#2d,#0c,#2b
	db #18,#27,#18,#e8,#09,#29,#12,#29
	db #06,#29,#0c,#e8,#07,#32,#30,#32
	db #06,#33,#06,#35,#0c,#33,#0c,#32
	db #0c,#33,#0c,#30,#24,#30,#06,#32
	db #06,#33,#0c,#32,#0c,#30,#0c,#32
	db #0c,#2e,#18,#2b,#18,#ff,#e8,#04
	db #e9,#12,#f0,#00,#ea,#15,#e4,#01
	db #00,#06,#e4,#0e,#00,#06,#e4,#01
	db #00,#06,#e4,#0e,#00,#06,#ea,#16
	db #e4,#01,#00,#12,#ea,#15,#e4,#0e
	db #00,#06,#e4,#01,#00,#06,#e4,#0e
	db #00,#06,#e4,#01,#00,#06,#e4,#0e
	db #00,#06,#ea,#00,#e4,#06,#48,#0c
	db #e4,#06,#00,#06,#e4,#06,#00,#06
	db #ff,#00,#00,#00,#00,#00,#00,#00
	db #fa,#01,#fd,#08,#fe,#09,#e8,#03
	db #e9,#0f,#2d,#10,#2b,#10,#29,#10
	db #28,#10,#26,#10,#26,#08,#00,#08
	db #24,#10,#22,#10,#1d,#10,#1d,#08
	db #e1,#e8,#03,#e9,#0d,#ea,#15,#e6
	db #0c,#e4,#06,#3b,#08,#39,#08,#39
	db #08,#e4,#01,#37,#08,#e4,#0e,#37
	db #08,#35,#08,#e4,#0e,#36,#08,#e4
	db #01,#34,#08,#e4,#0e,#34,#08,#32
	db #08,#32,#08,#00,#08,#e4,#06,#32
	db #08,#30,#08,#30,#08,#e4,#01,#2e
	db #08,#e4,#0e,#2b,#08,#29,#08,#29
	db #08,#e1,#e8,#03,#e9,#0e,#00,#04
	db #3d,#10,#3b,#10,#39,#10,#38,#10
	db #36,#10,#36,#08,#00,#08,#34,#10
	db #32,#10,#2d,#10,#2d,#08,#e1,#00
	db #00,#00,#e6,#0e,#e8,#08,#e9,#0d
	db #ea,#16,#e4,#01,#21,#0c,#15,#0c
	db #15,#0c,#e4,#01,#21,#0c,#e4,#01
	db #21,#0c,#15,#0c,#13,#0c,#1f,#0c
	db #e4,#01,#11,#0c,#11,#0c,#15,#0c
	db #e4,#01,#18,#0c,#e4,#01,#11,#0c
	db #11,#0c,#15,#0c,#18,#0c,#e4,#01
	db #1d,#0c,#11,#0c,#11,#0c,#e4,#01
	db #1d,#0c,#e4,#01,#1d,#0c,#11,#0c
	db #10,#0c,#1c,#0c,#e4,#01,#1a,#0c
	db #1a,#0c,#1d,#0c,#e4,#01,#21,#0c
	db #e4,#01,#1a,#0c,#1a,#0c,#1d,#0c
	db #21,#0c,#ff,#e6,#0e,#e8,#03,#e9
	db #0c,#f0,#00,#00,#0c,#30,#0c,#e9
	db #0a,#34,#0c,#e9,#0c,#e9,#0a,#37
	db #0c,#e9,#0c,#e9,#0b,#34,#0c,#e9
	db #0c,#e9,#0b,#30,#0c,#e9,#0c,#e9
	db #0a,#32,#0c,#e9,#0c,#e9,#0a,#34
	db #0c,#e9,#0c,#30,#60,#00,#0c,#35
	db #0c,#e9,#0a,#39,#0c,#e9,#0c,#e9
	db #0a,#3c,#0c,#e9,#0c,#e9,#0b,#39
	db #0c,#e9,#0c,#e9,#0b,#35,#0c,#e9
	db #0c,#e9,#0a,#37,#0c,#e9,#0c,#39
	db #06,#37,#06,#35,#30,#32,#30,#ff
	db #00,#05,#e5,#0b,#ff,#00,#00,#00
	db #00,#00,#e8,#05,#1f,#0c,#1f,#0c
	db #1f,#0c,#1f,#0c,#1d,#0c,#1d,#0c
	db #1d,#0c,#1d,#0c,#0c,#0c,#18,#0c
	db #10,#0c,#e4,#01,#1c,#0c,#e4,#01
	db #11,#0c,#1d,#0c,#1d,#0c,#1e,#0c
	db #e4,#01,#13,#0c,#1f,#0c,#10,#0c
	db #e4,#01,#1c,#0c,#e4,#01,#1d,#0c
	db #1c,#0c,#1d,#0c,#1e,#0c,#e4,#01
	db #13,#0c,#1f,#0c,#10,#0c,#e4,#01
	db #1c,#0c,#e4,#01,#1d,#0c,#1e,#0c
	db #1f,#0c,#20,#0c,#ff,#f0,#0c,#00
	db #0c,#3b,#0c,#3b,#0c,#3c,#0c,#3e
	db #0c,#3c,#0c,#3b,#0c,#37,#0c,#3c
	db #3c,#3b,#0c,#3c,#06,#3b,#06,#37
	db #48,#39,#0c,#3b,#06,#39,#06,#37
	db #18,#30,#18,#2d,#18,#00,#24,#ff
	db #e5,#0e,#ff,#00,#fa,#01,#fd,#11
	db #fe,#12,#e8,#18,#e9,#0c,#f0,#00
	db #e6,#0d,#2d,#38,#2b,#38,#29,#54
	db #2b,#1c,#2d,#38,#2b,#38,#29,#70
	db #e6,#0a,#2d,#38,#2b,#38,#29,#38
	db #28,#70,#26,#38,#1f,#38,#21,#38
	db #23,#38,#20,#40,#21,#7e,#20,#fc
	db #00,#fc,#ff,#e8,#18,#e9,#0d,#f0
	db #00,#e6,#0d,#34,#54,#3b,#1c,#34
	db #1c,#32,#54,#34,#54,#3b,#1c,#34
	db #38,#32,#38,#e6,#0a,#34,#54,#3b
	db #1c,#34,#38,#32,#38,#37,#38,#30
	db #1c,#30,#0e,#30,#0e,#2f,#38,#30
	db #1c,#2f,#0e,#30,#0e,#32,#38,#2f
	db #40,#28,#7e,#29,#fc,#00,#fc,#ff
	db #e8,#18,#e9,#10,#f0,#00,#e6,#0d
	db #3c,#38,#3b,#1c,#40,#1c,#39,#38
	db #39,#1c,#3b,#1c,#3c,#38,#3b,#1c
	db #37,#38,#39,#54,#e6,#0a,#3c,#38
	db #3b,#1c,#40,#1c,#39,#54,#37,#1c
	db #3e,#1c,#3c,#1c,#35,#38,#35,#38
	db #35,#2a,#35,#46,#34,#1e,#32,#22
	db #32,#2a,#30,#54,#30,#fc,#fc,#01
	db #ff,#00,#00,#00,#00,#00,#fa,#03
	db #fc,#14,#e8,#13,#e9,#00,#1a,#14
	db #ff,#e8,#13,#e9,#11,#1a,#1e,#ff
	db #00,#01,#ff,#00,#00,#00,#fa,#01
	db #e8,#03,#e9,#12,#ea,#00,#e4,#06
	db #60,#01,#39,#02,#e1,#fa,#01,#e8
	db #09,#e9,#00,#e4,#01,#5f,#09,#ea
	db #0c,#e1,#e8,#19,#18,#63,#e1,#63
	db #e1,#00,#00,#00,#00,#00,#fa,#02
	db #fc,#1b,#e8,#1a,#e9,#1b,#4f,#1a
	db #e8,#1c,#e9,#1d,#45,#64,#e1,#fa
	db #03,#fc,#18,#e8,#19,#e9,#0f,#ea
	db #0f,#e4,#09,#35,#20,#e8,#1c,#ea
	db #04,#e4,#01,#00,#a0,#e1,#00,#02
	db #e8,#1a,#e9,#1b,#4f,#16,#e1,#00
	db #fa,#02,#fc,#1d,#e8,#18,#e9,#1e
	db #43,#37,#e1,#00,#01,#e8,#18,#e9
	db #1e,#43,#37,#e1,#fa,#02,#e8,#03
	db #e9,#10,#ea,#00,#e4,#01,#27,#03
	db #1b,#07,#e1,#00,#00,#00,#00,#00
	db #fa,#02,#fc,#21,#e8,#1f,#e9,#20
	db #3c,#1c,#e1,#fa,#02,#fc,#21,#e8
	db #1f,#e9,#20,#4a,#1c,#e1,#00,#06
	db #e8,#1f,#e9,#20,#54,#1c,#e1,#00
	db #00,#00,#00,#00,#fa,#03,#e8,#07
	db #e9,#00,#ea,#17,#e4,#0e,#2f,#02
	db #00,#04,#e9,#12,#e4,#07,#3b,#09
	db #e9,#16,#e8,#11,#e4,#0e,#5d,#16
	db #e1,#fa,#03,#e8,#19,#ea,#17,#e4
	db #0e,#00,#11,#e1,#fa,#03,#e8,#19
	db #f0,#16,#ea,#00,#e4,#0e,#18,#63
	db #e1,#00,#fa,#03,#fc,#26,#00,#01
	db #fd,#26,#00,#03,#e5,#26,#e1,#e8
	db #21,#e9,#10,#4c,#09,#41,#09,#4c
	db #08,#41,#08,#4c,#07,#41,#07,#4c
	db #06,#41,#06,#41,#06,#4c,#05,#4c
	db #04,#41,#04,#58,#0b,#e1,#fa,#01
	db #e8,#05,#e9,#07,#ea,#0d,#e4,#0e
	db #31,#16,#e1,#00,#00,#00,#fa,#01
	db #e8,#03,#e9,#12,#ea,#0a,#e4,#01
	db #5f,#07,#ea,#0c,#e4,#0e,#00,#01
	db #e1,#fa,#01,#e8,#03,#e9,#12,#ea
	db #0c,#e4,#01,#32,#03,#56,#06,#18
	db #01,#e1,#fa,#03,#e8,#04,#e9,#1e
	db #ea,#0e,#e4,#0a,#54,#11,#e1,#06
	db #29,#0c,#e1,#0a,#e4,#0e,#11,#04
	db #e1,#04,#e1,#22,#e8,#22,#e9,#12
	db #ea,#0c,#e4,#0e,#60,#42,#e1,#e8
	db #22,#e9,#22,#ea,#0c,#e4,#0e,#18
	db #2c,#e8,#1c,#e4,#0d,#00,#c6,#e1
	db #fa,#03,#fd,#18,#fc,#15,#e8,#22
	db #e9,#22,#ea,#0c,#e4,#0e,#1a,#68
	db #e1,#22,#ea,#0c,#e4,#0e,#1a,#68
	db #e1,#00,#00
;------------------------------------------------
FINISH          DEFL $
                LIST
;                CLOSE
;START           DEFL START
;FINISH          DEFL FINISH
LENGTH          DEFL FINISH-START
;JDRogers.
;
.game_name
	db "Exolon Atari ST",0
.game_year
	db "1987",0
.game_publisher
	db "Hewson",0
.music_author
	db "Dave Rogers",0
.music_comment
	db "",0

	read "music_end_v1_0.asm"
